//
//  OneTestViewController.m
//  ZSComponent
//
//  Created by HuangZuShu on 17/9/7.
//  Copyright © 2017年 Mac. All rights reserved.
//

#import "OneTestViewController.h"
#import "ZSPageBarView.h"
#import "NSMutableAttributedString+ZSExtension.h"

@interface OneTestViewController ()

@end

@implementation OneTestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 7.0)
    {
        self.edgesForExtendedLayout = UIRectEdgeNone;               //视图控制器，四条边不指定
        self.extendedLayoutIncludesOpaqueBars = NO;                 //不透明的操作栏<br>    self.modalPresentationCapturesStatusBarAppearance = NO;
    }
    
    
    UIColor * NormalColor = [UIColor grayColor];
    UIFont * normalFont = [UIFont systemFontOfSize:13];
    UIColor * selectedColor = [UIColor redColor];
    UIFont * selectedFont = [UIFont systemFontOfSize:16];
    NSArray * titles = @[@"One", @"Two", @"thr", @"For", @"12345", @"34567", @"1234"];
    CGSize  size = CGSizeMake([UIScreen mainScreen].bounds.size.width / 3.0, 50);
    
    ZSPageBarView * view = [[ZSPageBarView alloc] initNormalColor:NormalColor normalFont:normalFont selectedColor:selectedColor selectedFont:selectedFont itemTitles:titles cellSize:size];
    [self.view addSubview:view];
    view.backgroundColor = [UIColor greenColor];
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left);
        make.top.equalTo(self.view.mas_top);
        make.right.equalTo(self.view.mas_right);
        make.height.equalTo(@50);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
